In optics the index of refraction (or refractive index), denoted as ‘n’ of an optical medium, is a number that describes how light, or any other radiation, propagates through that medium. The index of refraction is defined as the factor by which the wavelength and the velocity of the radiation are reduced with respect to their vacuum values: When light moves from one medium to another, the light changes direction (e.g., the light is refracted).
A diffraction grating is an optical component with a periodic structure, which splits and diffracts light into several beams travelling in different directions. The directions of these beams depend on the spacing of the grating and the wavelength of the light so that the grating acts as the dispersive element.